<div class="breadcrumbs">
    <div class="container-fluid">
        <ul class="bread pull-left">
            <li><a href="#">Silabus</a></li>
            <li class="active"><a href="#">Silabus Teori</a></li>
        </ul>
    </div>
</div>
<div class="row-fluid">
    <div class="span12">
        <div class="box">
            <div class="box-content">
                <form action="{$config->site_url('silabus/teori/search_process')}" class="form-horizontal" method="post">
                    <table width="100%">
                        <tr>
                            <td width="10%">Tahun Ajaran</td>
                            <td width="10%">
                                <select name="tahun" class="input-small">
                                    <option value=""></option>
                                    {foreach from=$rs_tahun item=t}
                                    <option value="{$t.tahun}" {if $search.tahun|default:'' eq $t.tahun}selected='selected'{/if}>{$t.tahun}</option>
                                    {/foreach}
                                </select>
                            </td> 
                            <td width="5%"></td>
                            <td width="5%">Semester</td>
                            <td width="70%">
                                <select name="semester" class="input-mini">
                                    <option value=""></option>
                                    {foreach from=$rs_sms item=s}
                                    <option value="{$s}" {if $search.semester|default:'' eq $s}selected='selected'{/if}>{$s}</option>
                                    {/foreach}
                                </select>
                                <input class="btn btn-primary" type="submit" value="Cari" name="save" />
                                <input class="btn btn-danger" type="submit" value="Reset" name="save" />
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <!-- notification template -->
        {include file="base/templates/notification.html"}
        <!-- end of notification template-->
        <div class="box">
            <div class="box-head">
                <h3>Data Mata Kuliah Diampu</h3>
            </div>
            <div class="box-content box-nomargin">
                <table class='table table-striped dataTable table-bordered'>
                    <thead>
                        <tr>
                            <th width="5%"><b>No.</b></th>
                            <th width="5%"><b>TA</b></th>
                            <th width="5%"><b>SMS</b></th>
                            <th width="50%"><b>Mata Kuliah</b></th>
                            <th width="5%"><b>SKS</b></th>
                            <th width="5%"><b>Silabus</b></th>
                            <th width="10%"></th>
                        </tr>
                    </thead>
                    <tbody>
                        {foreach from=$rs_id item=result}
                        <tr>
                            <td style="text-align: center;">{$no++}.</td>
                            <td style="text-align: center;">{$result.tahun|default:''}</td>
                            <td style="text-align: center;">{$result.semester|default:''}</td>
                            <td>{$result.makul_nm|default:''}</td>
                            <td style="text-align: center;">{$result.makul_sks|default:''}</td>
                            {$cek = $silabus->get_total_data_silabus_by_tipe(array($result.tahun, $result.semester, $result.dosen_kd, $result.makul_kd, 'teori'))}
                            <td style="text-align: center;">
                                {if $cek > 0}
                                <img src="{$BASEURL}resource/doc/images/icon/icon.approve.png" alt="" />
                                {else}
                                <img src="{$BASEURL}resource/doc/images/icon/icon.delete.png" alt="" />
                                {/if}
                            </td>
                            <td style="text-align: center;">
                                <a href="{$config->site_url('silabus/teori/manage')}/{$result.tahun}/{$result.semester}/{$result.dosen_kd}/{$result.makul_kd}" class='btn btn-mini btn-square tip' title="Edit Data">
                                    <img src="{$BASEURL}resource/doc/images/icon/edit-icon.png" alt="" height="15"> Manage
                                </a>
                            </td>
                        </tr>
                        {foreachelse}
                        <tr>
                            <td colspan="7">Data tidak ditemukan !</td>
                        </tr>
                        {/foreach}
                    </tbody>
                </table>
                <div class="dataTables_info">{$pagination.start|default:0} - {$pagination.end|default:0} dari <strong>{$pagination.total|default:0}</strong> data</div>
                <div class="dataTables_paginate paging_bootstrap pagination">{$pagination.data|default:''}</div>
            </div>
        </div>
    </div>
</div>